Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ractive.render() #107

Merged
merged 1 commit into from
Jul 15, 2014
Merged

Update ractive.render() #107

merged 1 commit into from
Jul 15, 2014

Conversation

rstacruz
Copy link
Contributor

Updates render() with basic usage info.

The docs say that render() will throw an error, but it doesn't. In fact, calling insert() on a new component will ask you to invoke render().

var r = new Ractive({ template: '<div>hi</div>' });
r.insert(document.body); // fail

var parent = document.createDocumentFragment(); /* or .createElement('DIV') */
r.render(parent);
r.insert(document.body); // ok

@jonvuri
Copy link
Contributor

jonvuri commented Jul 15, 2014

Ref #91 and #71. Could you please look those over briefly and make sure this is consistent with discussion in those, and also post comments in them if this fixes anything they cover?

@rstacruz
Copy link
Contributor Author

Yes Indeed — I came across the exact problem as #91. Poking around, it looks like .render() is meant to be called. This comment suggests so as well.

jonvuri added a commit that referenced this pull request Jul 15, 2014
Update ractive.render() (Ref #71) (Ref #91)
@jonvuri jonvuri merged commit 9099307 into ractivejs:master Jul 15, 2014
@rstacruz
Copy link
Contributor Author

Awesome, thanks! Perhaps it'd be nice to edit it to add some practical examples later.

@jonvuri
Copy link
Contributor

jonvuri commented Jul 16, 2014

Open a new issue or say that on #91. This is closed and PRs aren't the best place for to-do's and discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants